<div class="page-content" >
	<div class="panel panel-default">
		<div class="panel-heading">
			<ul class="breadcrumb">
				<li><a href="<{:U('index')}>">管理员</a> </li>
				<li class="active">添加管理员</li>
			</ul>
		</div>
		<div class="panel-body">
			<form id="myform" method="post" class="form-horizontal" action="<{:U('admin_add_do')}>">
				<div class="form-group">
					<label for="input-title"   class="col-sm-2 control-label">用户名</label>
					<div class="col-sm-7">
						<input  type="text" class="form-control"   id="user_name" name="user_name" value="">
					</div>
				</div>
				<div class="form-group">
					<label for="input-title"  class="col-sm-2 control-label">密码</label>
					<div class="col-sm-7">
						<input type="password" name="password" id="password" value="" class="form-control" >
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-7">
						<button type="submit" class="btn btn-primary">保存</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<script>
 
$(function(){
    $(".form-horizontal").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
            user_name: {
                message: '用户名名称',
                validators: {
                    notEmpty: {
                        message: '用户名不能为空'
                    },
					 remote: {
                        message: '帐号已被抢先注册了',
                        url: '<{:U("check_user")}>'
                    },
                }
            },
			password: {
                message: '密码',
                validators: {
                    notEmpty: {
                        message: '密码不能为空'
                    },
                }
            },
			 
			  

        }
    });
	
 
});
 </script> 
